package top.iuna.jxls.core.model;

import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.RandomUtils;

import lombok.Data;

/**
 * AI 乒乓球运动员(虚拟,纯属demo)
 * 
 * @author Cheney.Sun
 * @time 2018-04-07
 */
@Data
public class AIPaddler {

  private final static String[] GRIPS = {"直拍", "横拍", "直拍横打"};


  /**
   * 名字
   */
  private String name;
  /**
   * 第几代AI
   */
  private Integer generationNum;
  /**
   * 握拍方式:直拍,横拍,直拍横打(杜撰的)
   */
  private String grip;



  public static AIPaddler create() {
    AIPaddler aiPaddler = new AIPaddler();
    aiPaddler.setName(RandomStringUtils.randomAlphabetic(9));
    aiPaddler.setGenerationNum(RandomUtils.nextInt(1, 10000));
    aiPaddler.setGrip(GRIPS[RandomUtils.nextInt(0, GRIPS.length)]);// [)
    return aiPaddler;
  }

}
